{{template "system/admin/head.html"}}

<div class="row">
    <div class="col-xs-12">
        <a href="{{urlfor "AdminNewsController.NewsAdd"}}" class="btn btn-sm btn-default"><i class="fa fa-plus"></i>
            添加新闻</a>
    </div>
</div>

<div class="space-4"></div>

<div class="row">
    <div class="col-xs-12">
        <table class="table table-striped table-bordered table-hover">
            <thead>
            <tr>
                <th class="col-xs-2">序号</th>
                <th class="col-xs-2">标题</th>
                <th class="col-xs-2">时间</th>
                <th class="col-xs-2">操作</th>
            </tr>
            </thead>
            <tbody>
            {{ range $k,$data := .dataList}}
            <tr>
                <td>{{$data.ID}}</td>
                <td><span style="color: {{str2html $data.Color}}">{{$data.Title}}</span></td>
                <td>{{$data.UpdatedAt}}</td>
                <td>
                    <a href="{{urlfor "AdminNewsController.NewsAdd"}}?id={{$data.ID}}">编辑</a> |
                    <a href="{{urlfor "AdminNewsController.NewsDelete"}}?id={{$data.ID}}">删除</a>
                </td>
            </tr>
            {{else}}
            <tr>
                <td colspan="100" style="text-align: center">现在还没有新闻...</td>
            </tr>
            {{end}}
            </tbody>
        </table>
    </div>
</div>

<div class="row">
    <div class="col-xs-12"></div>
</div>
{{template "system/admin/foot.html"}}